home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 694 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  906 b 

  1. From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
  2. Date: Tue, 7 Dec 93 10:30:49 +0100
  3. Message-Id: <9312070930.AA02205@issan.informatik.uni-dortmund.de>
  4. To: mint@atari.archive.umich.edu
  5. In-Reply-To: <199312051613.AA04610@techfac.TechFak.Uni-Bielefeld.DE> (message from Torsten Scherer on Sun, 5 Dec 93 15:44:36 +0100)
  6. Subject: Re: (another) problem with mntlib41 tfork() function
  7.  
  8. This patch for MiNTlib PL41 fixes the memory leak. It just moves the
  9. calls to Mfree to the right place.
  10.  
  11. --- orig/thread.c    Fri Sep 17 18:10:46 1993
  12. +++ thread.c    Tue Dec  7 01:10:58 1993
  13. @@ -95,8 +95,6 @@
  14.  
  15.          now = _clock();
  16.          pid = Pexec(4, 0L, b, 0L);
  17. -        (void)Mfree(b->p_env);    /* free the memory */
  18. -        (void)Mfree(b);
  19.  
  20.          _base = savbase;
  21.      /* restore signal stuff */
  22. @@ -115,5 +113,7 @@
  23.              _childtime += __waittime;
  24.          }
  25.      }
  26. +    (void)Mfree(b->p_env);    /* free the memory */
  27. +    (void)Mfree(b);
  28.      return pid;
  29.  }
  30.